import { defineStore } from "pinia";
export const useAudio = defineStore('Audio', {
    state() {
        return {
            paly: false,
            musicList: [] as string[],
            sort: '随机',
            song: [] as musicDetail[]
        }
    },
    getters: {},
    actions: {
        stopMove() {
            const m = function (e: any) {
                e.preventDefault();
            };
            document.body.style.overflow = "hidden";
            document.addEventListener("touchmove", m, { passive: false }); //禁止页面滑动
        },
        Move() {
            const m = function (e: any) {
                e.preventDefault();
            };
            document.body.style.overflow = ""; //出现滚动条
            document.removeEventListener("touchmove", m,);
        },

    }
})